package com.lwq.designpattern.behavioralPatterns.chainOfResponsibilityPattern;

/**
 * @author liwq
 * @description
 * @date 2021/11/30 11:05
 */
public class Demo {
    public static void main(String[] args) {
        // 组装责任链
        Handler groupTeam = new GroupTeam(Handler.groupTeamApproveDays);
        Handler projectManager = new ProjectManager(Handler.projectManagerApproveDays);
        groupTeam.setNextHandler(projectManager);
        // 请假
        groupTeam.handleRequest(1);
        groupTeam.handleRequest(8);
        groupTeam.handleRequest(12);
    }
}
